// TOWN DIALOGUE SCRIPT
//    Town 121: Delis

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "You meet a scribe. She is a middle-aged woman with a lovely dress, and a grimy adventurer in her office makes her very nervous. Even more so when she gets a close look at you, and starts to suspect where you are from.";
	text2 = "_Excuse me. Sorry. I am closing for today. Please go. Maybe return tomorrow._";


begintalknode;
	tag = 2;
	text1 = "Bah. Landfolk.";
	text2 = "Leave me to me work.";
	text3 = "I'm an honest sailor.";
	text4 = "I'm going to sea soon.";
	text5 = "What're you lookin' at?";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,5));
	break;

// Carroll

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Carroll";
	text1 = "The town's innkeeper is old, bitter, and very warty. He doesn't look like he enjoys his job, and he certainly isn't impressed with you. _I'm Carroll. Whaddaya' want?_";
	text5 = "Carroll watches you suspiciously. You start to feel very conscious of your pale skin. _Whaddaya' want?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_That depends. What do you have?_";
	text1 = "_Well, I got the captain's room open for five coins. I got grog for three coins for a round. You're just lucky I'm servin' landlubbers._";

begintalknode;
	state = 2;
	nextstate = 4;
	question = "_You calling me a landlubber?_";
	text1 = "_Yeah. What of it? This has been a town that lives by shipping. But with all the monsters, no boats are goin' anywhere. So we gotta' serve people who don't make honest livings._";
	text2 = "He spits on the floor. _But we don't have to like it._";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_What do you consider an honest living?_";
	text1 = "_On the sea! That is the place for a man! Not in dungeons and lairs like some sort of scavenging worm!_";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_What monsters are you having problems with?_";
	text1 = "_You know? The slimes? Roaches? All that? Where ya' been? Avernum?_";
	text3 = "_You know? The slimes? Roaches? All that? Where ya' been? Avernum?_ He pauses. _Of course, ya' may not know. There's been a whole lot less problems with the slimes lately._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 5;
	nextstate = -1;
	condition = gf(121,10) == 0;
	question = "_As a matter of fact, yes. We have been in Avernum._";
	text1 = "He looks nervous. _I thought as much. Just don't cause trouble._ Now that he knows where you're from, he seems very eager to be somewhere else.";
	action = SET_SDF 121 10 1;

begintalknode;
	state = 5;
	nextstate = 1;
	condition = gf(121,10) == 0;
	question = "_Uhhh... no. Avernum? We've never been there._";
	text1 = "He nods, relieved. _I hoped not. I'd hoped you just look as pale and sick as a fish belly by choice. Now what do you want? I can't just stand here all day._";
	action = SET_SDF 121 10 1;

begintalknode;
	state = 1;
	nextstate = 3;
	condition = coins_amount() >= 3;
	question = "_I'll take some booze._ Pay 3 coins.";
	text1 = "The harsh liquor burns your throats, and Carroll chuckles mockingly. When you're done, he collects your mugs and whispers, _Got a secret for ya'. Only 10 coins._";

	code =
		force_char_status(30000,1,20);
		change_coins(-3);
	break;

begintalknode;
	state = 3;
	nextstate = 1;
	condition = coins_amount() >= 10;
	question = "_Sure. What's your secret?_ Pay 10 coins.";
	text1 = "He pockets your cash and leans close to you, giving you an excellent view of his warts. _To the north is Pergies. They do mining. Look around. I hear ya' can get supplies cheap at one of the mines. Though they may not be serving outsiders much._";
	code =
		change_coins(-10);
	break;

begintalknode;
	state = 3;
	nextstate = 1;
	condition = 1;
	question = "_No deal._";
	text1 = "_Fine._";
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_I'll take the captain's room for the day._ Pay five coins.";
	text1 = "He shows you to your room, muttering something about how it's normally meant for the lords of the sea, not _scrawny meat,_ like you. The room smells like rotting fish, and you sleep poorly.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),28,21,FALSE);
		relocate_char(get_pc_id(1),29,21,FALSE);
		relocate_char(get_pc_id(2),29,22,FALSE);
		relocate_char(get_pc_id(3),28,22,FALSE);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I have to go._";
	text1 = "_Not sorry to hear it._";
	action = END_TALK;


// Glydden

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Glydden";
	text1 = "A priest with a large sword sits at the bar, drinking prodigious quantities of grog. She turns as you approach, and you can see the booze hasn't affected her in the slightest. _Hail to you. I'm Glydden. I'm captain here. Captain Glydden. Not of a ship. Of the army._";
	text5 = "_What else do you want, friend? Don't go causin' trouble and we ain't got no problems._ She takes a deep swig of the strong ale.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What's your job here?_";
	text1 = "_I'm the captain in Delis._ She eyes you carefully. _Been here for five years, since I served in the Avernum campaign._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_What was the Avernum campaign like for you?_";
	text1 = "_It was a long, bloody business. I got nothin' against the worms. It's nothing personal._ (Worms are what the Empire troops called the Avernites.) _But I'll gut any one of them who messes with my boys._";
	text2 = "She watches you carefully as she says this. No doubt she suspects you're an Avernite, if she isn't sure already.";

begintalknode;
	state = 30;
	nextstate = 32;
	question = "_What are your responsibilities, Captain?_";
	text1 = "_I send out the patrols here, and keep an eye on what all happens in town. Plus, sometimes I gotta' do priest stuff. I spent a lot of years as a holy soldier._";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_You send out many patrols?_";
	text1 = "_I have to in these times, what with all the filth running around. They're good lads, out day after day wiping out slimes. And anyone else who gets in their way, if you catch my meanin'._ She watches you coldly.";

begintalknode;
	state = 32;
	nextstate = 35;
	question = "_What is a holy soldier?_";
	text1 = "_Me. A priest who is good with weapons is a real asset in a fight, blessing and swinging. I did a lot of fightin', and a lot of healing._";

begintalknode;
	state = 35;
	nextstate = -1;
	condition = 1;
	question = "_We could use the services of a healer._";
	text1 = "_Ahhhh ... You look all right. Just stay in the inn. A good night's sleep will fix you up._";

begintalknode;
	state = 30;
	nextstate = 34;
	question = "_What sort of town is Delis?_";
	text1 = "_This is the big seaport for stuff being shipped to and from the north. Sometimes I think there's more than just shipping going on._";

begintalknode;
	state = 34;
	nextstate = -1;
	question = "_What else besides shipping is going on?_";
	text1 = "She shakes her head. _Not my job. Don't know nothin' about it._";

begintalknode;
	state = 29;
	nextstate = 33;
	condition = gf(281,5) >= 1;
	question = "_I helped out one of your patrols that was ambushed by slimes._";
	text1 = "_Well,_ she says, _I never thought I'd see the day one of my troops was saved by an Avernite. You have my gratitude, friend. And, if you're fighting the slimes with us, I have a bit of advice for you._";
	text3 = "_Ya, I remember, thanks. Never thought Avernites would do that for my people. I appreciate it. If you're fighting the slimes with us, I have a bit of advice for you._";
	code =
		if (gf(121,11) == 0) {
			rs(3);
			sf(121,11,1);
			award_party_xp(50,8);
			change_reputation(1);
			}
			else rs(1);
	break;

begintalknode;
	state = 33;
	nextstate = -1;
	question = "_What advice do you have for me?_";
	text1 = "_West of Krizsan, on the south shore, we've seen this tower that has slimes working for brigands._ She nods. _That's right. Slimes actually enslaved to brigands. Someone should check that out. They might learn something interesting._";
	text3 = "_Now that the slimes are almost all dead, there's still plenty of other monsters to fight. Head up to Shayder, on the island to the northwest. The cockroaches aren't much tougher than the slimes, I hear._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_How goes the battle against the slimes?_";
	text1 = "_Badly. My soldiers are out everywhere, hunting for the foul creatures. We kill fifty and they kill one of us, and we come out the worse for it._";
	text3 = "_Won, as far as I can tell. Hardly see any more of them these days. I guess we killed enough of them._";
	action = DEP_ON_SDF 307 3 0;

// Claw

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Claw";
	text1 = "There is a nephil sitting at the desk. He bears the markings, necklaces, fetishes, and other symbols of a shaman.";
	text2 = "He's writing with a quill pen, held awkwardly in his right hand. His left hand is just a stump. _Hmrrr. I am called Claw._";
	text5 = "Hmrrr looks up at you with inscrutable feline eyes. He seems strangely unconcerned about the danger of being a nephil in an Empire town.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_It's not often that I see a nephil around here. What's your job?_";
	text1 = "It makes a low rumbling sound deep in its throat. _I run this flop. I was a sailor._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Can anyone stay here?_";
	text1 = "_Hmrrrrr. There are only rooms for sailors._ It scrapes idly at the desktop with its claw.";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_Why did you become a sailor?_";
	text1 = "_I am not welcome with my people._ It makes a brief, angry hissing noise as it says this. _I went to the sea, where a shark surprised me._ He holds up his stump. _Now I run this flop, and look after my fellows._";
	text2 = "His speech is unusually clear and unaccented for a nephil.";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_Why didn't your people welcome you?_";
	text1 = "_Nephilim beliefs are nephilim secrets._";

begintalknode;
	state = 59;
	nextstate = 60;
	question = "_Who are your fellows?_";
	text1 = "_Sailors are my fellows now. Sailors of all types._";

begintalknode;
	state = 60;
	nextstate = -1;
	question = "_Get many interesting types of people staying here?_";
	text1 = "It makes an annoyed hissing noise. _You ask too much, human land person!_";
	action = END_TALK;

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_Are nephilim allowed in Empire towns?_";
	text1 = "_I'm looking right at another nephil in an Empire town. So I guess you're pretty dim._";
	text3 = "_Sometimes. It they're far enough out on the frontier. Sometimes we're allowed in Empire towns, where we get to waste our time with foolish questions._";
	code =
		if (species_in_party(2))
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_What is this place?_";
	text1 = "_It is a flop. Sailors can sleep here while waiting for another berth. That means sailors are welcome here. Unlike you._";

